﻿@{
    var db = new Project_2._2.Models.QuanLyThueXeEntities();
    var slide = (from a in db.Slides join b in db.ChiTietSlides on a.SlideId equals b.SlideId where a.TrangThai == true select new { Hinh = b.HinhAnh }).ToList();
}
<script src="~/Script/jcycle.js"></script>
        <div class="slide">
            <div id="vtemslideshow_wapper" style="width:1040px; height:300px; top: 0px; left: 0px;">
                <div id="vtemslideshow1" class="vtem_main_slideshow" style="position: relative; width: 1040px; height: 300px; overflow: hidden; top: 0px; left: 0px; border-radius:10px">
                    @foreach (var ct in slide)
	                {
		                <img class="slide-image" alt="" src="~/Images/Slider/@ct.Hinh" />
	                }
                </div>
            </div>
        </div>

        <script type="text/javascript">
            $(document).ready(function () {
                $('#vtemslideshow1').cycle({
                    fx: 'all',
                    timeout: 5000,
                    speed: 1000,
                    next: '#cycle_next',
                    prev: '#cycle_prev',
                    pager: '#vtemnav',
                    pagerEvent: 'click',
                    pagerAnchorBuilder: pagerFactory,
                    startingSlide: 0,
                    fit: true,
                    height: 300,
                    width: 1037
                });
                function pagerFactory(idx, slide) {
                    return '#vtemnav a:eq(' + idx + ') span';
                };
            });
        </script>   